SHELL	= /bin/sh
CC	= g++
OPT	= -O2 -Wall
DEBUG	= #-g
BIN	= ../../bin
PROGS	= $(BIN)/disk_stat $(BIN)/disk_sreset
CFLAGS	= $(DEFS) $(INCL) $(OPT) $(DEBUG) -I. -I ../auxtools/ $(XFLAGS)
LIBS    = -L../../lib -lauxtools

defs:
	@CC="$(CC)" sh ../makedefs

all:    $(PROGS)

$(BIN)/disk_stat: disk_stat.o ide.o 
	$(CC) $(CFLAGS) -o $@ disk_stat.o ide.o $(LIBS)

$(BIN)/disk_sreset: disk_sreset.o ide.o 
	$(CC) $(CFLAGS) -o $@ disk_sreset.o ide.o $(LIBS)

indent:
	indent *.c 

clean:
	rm -f $(PROGS) *.o core *.core *~

depend: $(MAKES)
	(sed '1,/^# do not edit/!d' Makefile; \
	set -e; for i in [a-z][a-z0-9]*.c; do \
	    $(CC) -E $(DEFS) $(INCL) $$i | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
	    -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' -e 'p' -e '}'; \
	done) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile

# do not edit below this line - it is generated by 'make depend'
disk_stat.o: disk_stat.c
disk_sreset.o: disk_sreset.c
ide.o: ide.c
